import android.os.Build
import android.os.Bundle
import android.view.View
import androidx.annotation.LayoutRes
import androidx.appcompat.app.AppCompatActivity


abstract class BaseActivity<P : IPresenter> : AppCompatActivity(), IActivity, IVIew {
    protected lateinit var mypre: P


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(findlayout())



//        lifecycle.addObserver(mypre)
        initView()
        initData()
    }

    override fun onResume() {
        super.onResume()

    }

    override fun onPause() {
        super.onPause()
    }

    override fun onDestroy() {
        super.onDestroy()
//        lifecycle.removeObserver(mypre)
    }


    /**
     * 展示dialog
     */
    override fun showDialog() {

    }

    /**
     * 隐藏dialog
     */
    override fun hideDialog() {

    }

    /**
     *加载信息
     */
    override fun showMsg(msg: String) {
    }

    /**
     * 跳转页面
     */
    override fun startPage(bundle: Bundle, clazz: Class<Any>) {

    }

}